package cn.tedu.system.oa.stamp.pojo.entity;

import cn.tedu.system.oa.base.convert.StampStatusConverter;
import cn.tedu.system.oa.base.convert.StampTypeConverter;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.FieldDefaults;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("seal_management")
public class Stamp {
    @ExcelProperty(index = 0,value = "编号")
    @TableId(type = IdType.AUTO)
    Long id;
//    @Column(name = "manage_id")
    @ExcelProperty(index = 5,value = "负责人ID")
    Long manageId;
//    @Column(name = "dept_id")
    @ExcelProperty(index = 6,value = "部门ID")
    Long deptId;
    @ExcelProperty(index = 1,value = "印章名")
//    @Column(name = "name")
    String name;
    @ExcelProperty(index = 4,value = "印章状态",converter = StampStatusConverter.class)
//   1 正常  2 封存 3 作废 4 遗失
//    @Column(name = "status")
    Integer status;
    @ExcelProperty(index = 2,value = "印章类型",converter = StampTypeConverter.class)
//    1  公章  2  员工章  3 部门章
//     4 财务章  5  合同章  6  法人章  7 发票章
//      8 其它章
//    @Column(name = "type")
    Integer type;
    @ExcelProperty(index = 3,value = "印章数")
//    @Column(name = "num")
    Integer num;
    @ExcelProperty(index = 7,value = "用途")
//    @Column(name = "function")
    String function;
    @ExcelProperty(index = 9,value = "备注")
//    @Column(name = "remark")
    String remark;
    @ExcelIgnore
    String imgUrl;

    @ExcelProperty(index = 8,value = "创建日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    Date createTime;

    @ExcelIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    Date updateTime;

    public Long getId() {
        return id;
    }

    public Long getManageId() {
        return manageId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public String getName() {
        return name;
    }

    public Integer getStatus() {
        return status;
    }

    public Integer getType() {
        return type;
    }

    public Integer getNum() {
        return num;
    }

    public String getFunction() {
        return function;
    }

    public String getRemark() {
        return remark;
    }

    public Date getCreateTime() {
        return createTime;
    }


}
